package com.sgb.auction.entity;

import android.text.TextUtils;
import com.swgk.core.util.DateUtils;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * Time:2021/11/26
 * AUTHOR:F_Q
 * Description:
 */
public class AuctionRecordEntity  implements Serializable {

    private String bidderNo;
    private String bidderName;
    private String bidderPhone;
    private String price;
    private String unitName;
    private String created;

    public String getBidderNo() {
        return bidderNo;
    }

    public void setBidderNo(String bidderNo) {
        this.bidderNo = bidderNo;
    }

    public String getBidderName() {
        return bidderName;
    }

    public void setBidderName(String bidderName) {
        this.bidderName = bidderName;
    }

    public String getBidderPhone() {
        return bidderPhone;
    }

    public void setBidderPhone(String bidderPhone) {
        this.bidderPhone = bidderPhone;
    }

    public String getPrice() {
        if (!TextUtils.isEmpty(price)){
            BigDecimal big = new BigDecimal(price);
            big = big.stripTrailingZeros();
            return big.toPlainString();
        }else {
            return "";
        }
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getCreated() {
        if (!TextUtils.isEmpty(created)){
            String createds = DateUtils.timestampToDateSecond(Long.parseLong(created));
            return createds;
        }else {
            return "";
        }
    }

    public void setCreated(String created) {
        this.created = created;
    }
}
